require

function require(value: boolean, message: text)

Checks a boolean condition and throws an exception if false.

Since

0.6.0

Parameters

value

The boolean condition to be checked.

message

The error message to be thrown if the condition is false.


function <T: -any> require(value: T?, message: text): T

Checks for null values and throws an exception if null.

Since

0.6.0

Parameters

value

The value to be checked for null.

message

The error message to be thrown if the value is null.